package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Collect;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CollectMapper {
    int deleteByPrimaryKey(Long id);
    int deleteByPrimaryKey(Collect record);

    int insert(Collect record);

    Collect selectByPrimaryKey(Long id);

    List<Collect> selectAll();

    int updateByPrimaryKey(Collect record);

    List<Collect> selectForList(QueryObject qo);

    /*查询收藏总数*/
    Integer selectForCount(Long userId);

    int selectCollectNum(@Param("type") Integer type,
                         @Param("userId") Long userId,
                         @Param("collectId") Long collectId);


}